#pragma once

class b2World;
class GLESDebugDraw;
struct b2Vec2;
class b2Body;

#define PTM_RADIO LSYEasyWorld::PTOM

class LSYEasyWorld
{
public:
	friend class LSYEasyBody;

	static b2World* createWorld(const b2Vec2& gravity);
	
	static GLESDebugDraw* createDebug();

	static void updateWorld();
	
    static float calcAngle(const b2Vec2& start, const b2Vec2& target);

	static b2Body* getBodyAt(const b2Vec2& pos);

	static float PTOM;
private:
	LSYEasyWorld(){}
	LSYEasyWorld(const LSYEasyWorld& src) {}
	~LSYEasyWorld() {}

	static b2World* pWorld;
	static GLESDebugDraw* pDebug;
	static float delta;
	static float positionDelta;
	static float velocityDelta;
};

